﻿using MoneyManagerNET.DAL.Mock;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Collections;

namespace Test.DAL.Mock
{
    
    
    /// <summary>
    ///This is a test class for EntityBusTest and is intended
    ///to contain all EntityBusTest Unit Tests
    ///</summary>
    [TestClass()]
    public class EntityBusTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for EntityBus Constructor
        ///</summary>
        [TestMethod()]
        public void EntityBusConstructorTest()
        {
            EntityBus target = new EntityBus();
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for CreateByType
        ///</summary>
        public void CreateByTypeTestHelper<TEntity>()
        {
            EntityBus_Accessor target = new EntityBus_Accessor(); // TODO: Initialize to an appropriate value
            object expected = null; // TODO: Initialize to an appropriate value
            object actual;
            actual = target.CreateByType<TEntity>();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        [TestMethod()]
        [DeploymentItem("MoneyManagerNET.DAL.Mock.dll")]
        public void CreateByTypeTest()
        {
            CreateByTypeTestHelper<GenericParameterHelper>();
        }

        /// <summary>
        ///A test for Delete
        ///</summary>
        public void DeleteTestHelper<TEntity>()
            where TEntity : class
        {
            EntityBus target = new EntityBus(); // TODO: Initialize to an appropriate value
            TEntity entity = null; // TODO: Initialize to an appropriate value
            target.Delete<TEntity>(entity);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        [TestMethod()]
        public void DeleteTest()
        {
            DeleteTestHelper<GenericParameterHelper>();
        }

        /// <summary>
        ///A test for New
        ///</summary>
        public void NewTestHelper<TEntity>()
            where TEntity : class
        {
            EntityBus target = new EntityBus(); // TODO: Initialize to an appropriate value
            TEntity expected = null; // TODO: Initialize to an appropriate value
            TEntity actual;
            actual = target.New<TEntity>();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        [TestMethod()]
        public void NewTest()
        {
            NewTestHelper<GenericParameterHelper>();
        }

        /// <summary>
        ///A test for Reset
        ///</summary>
        [TestMethod()]
        public void ResetTest()
        {
            EntityBus target = new EntityBus(); // TODO: Initialize to an appropriate value
            target.Reset();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for SaveAll
        ///</summary>
        [TestMethod()]
        public void SaveAllTest()
        {
            EntityBus target = new EntityBus(); // TODO: Initialize to an appropriate value
            target.SaveAll();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Select
        ///</summary>
        public void SelectTestHelper<TEntity>()
            where TEntity : class
        {
            EntityBus target = new EntityBus(); // TODO: Initialize to an appropriate value
            Func<TEntity, bool> where = null; // TODO: Initialize to an appropriate value
            IEnumerable<TEntity> expected = null; // TODO: Initialize to an appropriate value
            IEnumerable<TEntity> actual;
            actual = target.Select<TEntity>(where);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        [TestMethod()]
        public void SelectTest()
        {
            SelectTestHelper<GenericParameterHelper>();
        }

        /// <summary>
        ///A test for SelectListByType
        ///</summary>
        public void SelectListByTypeTestHelper<TEntity>()
            where TEntity : class
        {
            EntityBus_Accessor target = new EntityBus_Accessor(); // TODO: Initialize to an appropriate value
            IEnumerable expected = null; // TODO: Initialize to an appropriate value
            IEnumerable actual;
            actual = target.SelectListByType<TEntity>();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        [TestMethod()]
        [DeploymentItem("MoneyManagerNET.DAL.Mock.dll")]
        public void SelectListByTypeTest()
        {
            SelectListByTypeTestHelper<GenericParameterHelper>();
        }
    }
}
